home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / reader_requests / notes / deutsch / violinenschlüssel.rexx < prev   
OS/2 REXX Batch file  |  2000-02-23  |  35KB  |  1,218 lines

  1. /* Unterprogramm für "Noten.pprx" */
  2.  
  3. signal on halt
  4. signal on break_c
  5. signal on break_e
  6. signal on break_d
  7. call ppm_SetStyle(N)
  8.  
  9. noteneingabe:
  10.     /* Kleinster notenabstand */
  11.     xgrdform = "(1,2,4,8 oder 16)"
  12.     xgrd = ppm_GetForm("Bitte für den kleinsten Notenwert eingeben ...", 3, xgrdform)
  13.     if xgrd == '' then  notenwert()
  14.     select
  15.      when xgrd == '1' then xg =0.7
  16.      when xgrd == '2' then xg =1.4
  17.      when xgrd == '4' then xg =2.8
  18.      when xgrd == '8' then xg =5.6
  19.      when xgrd == '16' then xg =11.2
  20.      otherwise notenwert()
  21.     end
  22.  
  23.    /* Punktgröße der Noten */
  24.    notepkt = 26
  25.    call ppm_SetJustification(0)
  26.    
  27.    zz = 0   /* Zeilenzähler */
  28.    notex = 0
  29.    notey = 0
  30.    page = ppm_CurrentPage()
  31.  
  32. clickpos:
  33.    res = ppm_GetUserText(2, "Manuell oder an Box ausrichten ? m/b")
  34.  
  35.    if res == 'M' then res = 'm'
  36.    if res == 'B' then res = 'b'
  37.  select
  38.    when res == 'm' then
  39.      do
  40.        clickpos = ppm_GetClickPosition("Bitte die Stelle anklicken wo ich beginnen soll...")
  41.        if clickpos == 0 then
  42.            do
  43.            exit_msg("Falsche Eingabe !! ENDE !!")
  44.            end
  45.        else
  46.            do
  47.            notey = word(clickpos, 2)
  48.            notex = word(clickpos, 1)
  49.            if notex < 2.5 then notex = 2.5
  50.            xw = notex
  51.            yw = notey
  52.              if notey <= 3.3  then zz= 0
  53.              if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  54.              if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  55.              if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  56.              if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  57.              if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  58.            end
  59.  
  60.      end
  61.    when res == 'b' then
  62.      do
  63.         clickbox = ppm_ClickOnBox("Bitte eine Box anklicken, an der Stelle, wo es weitergeht ...")
  64.         pos = ppm_GetBoxPosition(clickbox)
  65.         notex = word(pos, 1)
  66.         notey = word(pos, 2)
  67.         xw = notex
  68.         yw = notey
  69.         call ppm_BoxAtPosn(notex, notey, page)
  70.         if notey <= 3.3  then zz= 0
  71.         if ((notey > 5.5)&(notey < 9.3)) then zz = 4
  72.         if ((notey > 9.5)&(notey < 13.3)) then zz = 8
  73.         if ((notey > 13.5)&(notey < 17.3)) then zz = 12
  74.         if ((notey > 17.5)&(notey < 21.3)) then zz = 16
  75.         if ((notey > 21.5)&(notey < 25.3)) then zz = 20
  76.  
  77.         if notex <= 1 then
  78.         do
  79.           noteneingabe()
  80.         end
  81.      end
  82.    otherwise clickpos()
  83.  end
  84.  
  85.  
  86.    /* Zeigerbox */
  87.  
  88.    zbid = ppm_CreateBox(notex, zz+0.5, 0.3, 1, 0)
  89.    call ppm_SetSize(26)
  90.    zbn = ppm_GetBoxName(zbid)
  91.    call ppm_TextIntoBox(zbn, '5')
  92.  
  93.  
  94. notenwert:
  95.  
  96.    do forever
  97.            cr = '0a'x
  98.            form = "Wert Name ['A'ufl.]"
  99.            call ppm_SetBoxPosition(zbid, notex, zz+0.5)
  100.            call ppm_UpdateScreen()
  101.            eingabe = ppm_GetForm("Bitte für die Noten eingeben ...(nichts=Abbruch) ", 7, form)
  102.            if eingabe = '' then
  103.            do
  104.             call ppm_DeleteBox(zbid)
  105.             exit_msg()
  106.            end
  107.            nw = word(eingabe, 1)
  108.            nn = word(eingabe, 2)
  109.            if nw == 'P' then nw = 'p'
  110.            al = word(eingabe, 3)
  111.            if al == 'A' then al = 'a'
  112.            IF nw == 'D' then nw = 'd'
  113.            if nw == 'LEFT' then nw = 'left'
  114.            if nw == 'L' then nw = 'l'
  115.            if nw == 'T' then nw = 't'
  116.            if nn == 'T' then nn = 't'
  117.            if nw == "NEU" then nw = "neu"
  118.  
  119.         /* x-Abstände der Noten zueinander */
  120.     select
  121.       when nw=='s' then
  122.           do
  123.           xw = xg/16
  124.           nw='x'
  125.           yv = 0
  126.           end
  127.       when nw=='S' then
  128.           do
  129.           xw = xg/16
  130.           nw='X'
  131.           yv = 0.47
  132.           end
  133.       when nw=='a' then
  134.           do
  135.           xw = xg/8
  136.           nw='e'
  137.           yv = 0
  138.           end
  139.       when nw=='A' then
  140.           do
  141.           xw = xg/8
  142.           nw='E'
  143.           yv = 0.47
  144.           end
  145.       when nw=='v' then
  146.           do
  147.           xw = xg/4
  148.           nw='q'
  149.           yv = 0
  150.           end
  151.       when nw=='V' then
  152.           do
  153.           xw = xg/4
  154.           nw='Q'
  155.           yv = 0.47
  156.           end
  157.       when nw=='h' then
  158.           do
  159.           xw = xg/2
  160.           yv = 0
  161.           end
  162.       when nw=='H' then
  163.           do
  164.           xw = xg/2
  165.           yv = 0.47
  166.           end
  167.       when nw=='g' then
  168.           do
  169.           xw = xg
  170.           nw='w'
  171.           yv = 0
  172.           end
  173.       when nw=='G' then
  174.           do
  175.           xw = xg
  176.           nw='W'
  177.           yv = 0.47
  178.           end
  179.  
  180.      /* Sprung an den Anfang der Zeile */
  181.       when nw == 'left' then
  182.           do
  183.            call ppm_SetPagePosition(0, zz+1)
  184.           end
  185.  
  186.      /* Punkt nach der Note - muß als erstes eingegeben werden falls gewünscht
  187.         den nötigen Freiraum mit "sp" eingeben */
  188.  
  189.       when nw == 'pk' then
  190.           do
  191.             call ppm_SetSize(25)
  192.             box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26, 0.3, 0.9, 0)
  193.             call ppm_SetSize(20)
  194.             call ppm_TextIntoBox(box#id, 'd')
  195.            select
  196.                when nn == '1' then
  197.                do
  198.                xw = xg
  199.                notex = notex+xw
  200.                end
  201.                when nn == '2' then
  202.                do
  203.                xw = xg/2
  204.                notex = notex+xw
  205.                end
  206.                when nn == '4' then
  207.                do
  208.                xw = xg/4
  209.                notex = notex+xw
  210.                end
  211.                when nn == '8' then
  212.                do
  213.                xw = xg/8
  214.                notex = notex+xw
  215.                end
  216.                when nn == '16' then
  217.                do
  218.                xw  = xg/16
  219.                notex = notex+xw
  220.                end
  221.                when nn == 't' then
  222.                do
  223.                xw  = 0.2
  224.                notex = notex+xw
  225.                end
  226.                otherwise notenwert()
  227.            end
  228.            if notex >=18.7 then
  229.                do
  230.                  notex = 2.5
  231.                  zz = zz + 4
  232.                end
  233.            px = notex - 4
  234.            py = zz-1
  235.            if px < 0 then px = 0
  236.            call ppm_SetPagePosition(px, py+2)
  237.            notenwert()
  238.           end
  239.  
  240.       when nw == 'PK' then
  241.           do
  242.             call ppm_SetSize(25)
  243.             box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.25-yv, 0.3, 0.9, 0)
  244.             call ppm_SetSize(20)
  245.             call ppm_TextIntoBox(box#id, 'd')
  246.            select
  247.                when nn == '1' then
  248.                do
  249.                xw = xg
  250.                notex = notex+xw
  251.                end
  252.                when nn == '2' then
  253.                do
  254.                xw = xg/2
  255.                notex = notex+xw
  256.                end
  257.                when nn == '4' then
  258.                do
  259.                xw = xg/4
  260.                notex = notex+xw
  261.                end
  262.                when nn == '8' then
  263.                do
  264.                xw = xg/8
  265.                notex = notex+xw
  266.                end
  267.                when nn == '16' then
  268.                do
  269.                xw  = xg/16
  270.                notex = notex+xw
  271.                end
  272.                when nn == 't' then
  273.                do
  274.                xw  = 0.2
  275.                notex = notex+xw
  276.                end
  277.                otherwise notenwert()
  278.            end
  279.            if notex >=18.7 then
  280.                do
  281.                  notex = 2.5
  282.                  zz = zz + 4
  283.                end
  284.            px = notex - 4
  285.            py = zz-1
  286.            if px < 0 then px = 0
  287.            call ppm_SetPagePosition(px, py+2)
  288.            notenwert()
  289.           end
  290.  
  291.      /* Löschen */
  292.       when nw == 'd' then
  293.           do
  294.            oldpos = notex
  295.            thisbox = ppm_BoxNum()
  296.            if thisbox == zbid then
  297.              do
  298.              ppm_Inform(1, "Nichts mehr zu löschen!","OK")
  299.              notenwert()
  300.              end
  301.            lpos= ppm_GetBoxPosition()
  302.            notex = word(lpos, 1)
  303.            call ppm_DeleteBox()
  304.            diff = oldpos - notex
  305.            if diff<0 then notenwert()
  306.            if (diff < 0.3)&(diff > 0.1) then notex = notex + 0.23
  307.            py    = zz - 1
  308.            px = notex - 4
  309.            if px < 0 then px = 0
  310.            call ppm_SetPagePosition(px, py+2)
  311.            notenwert()
  312.           end
  313.  
  314.       /* Taktstrich */
  315.       when nw == 't' then
  316.           do
  317.            call ppm_SetLineWeight(0.25)
  318.            call ppm_DrawLine(notex, 2+zz, notex, 2.8+zz)
  319.            notex = notex+0.2
  320.           end
  321.  
  322.      /* Pausen */
  323.       when nw == 'p' then
  324.         do
  325. pausenwert:
  326.          /*  wert = ppm_GetForm("1/1 1/2 1/4 1/8 1/16 ...?", 2, "1 , 2, 4, 8, 16") */
  327.            x = notex
  328.            select
  329.                when nn== '1' then do
  330.  
  331.                    y = 2.28+zz
  332.                    call ppm_SetLineWeight(4)
  333.                    call ppm_DrawLine(x, y, x+0.4, y)
  334.                    call ppm_SetLineWeight(0.25)
  335.                    xw = xg
  336.                    notex = notex+xw
  337.                end
  338.  
  339.                when nn== '2' then do
  340.  
  341.                    y = 2.32+zz
  342.                    call ppm_SetLineWeight(4)
  343.                    call ppm_DrawLine(x, y, x+0.4, y)
  344.                    call ppm_SetLineWeight(0.25)
  345.                    xw = xg/2
  346.                    notex = notex+xw
  347.                end
  348.  
  349.                when nn== '4' then do
  350.  
  351.                    y = 2.07+zz
  352.                    Pbox = ppm_CreateBox(x, y, 0.59, 0.86, 0)
  353.                    boxnm = ppm_DocNextBox(Pbox)
  354.                    call ppm_DeleteContents(boxnm)
  355.                    call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/viertelPause', pause)
  356.                    xw = xg/4
  357.                    notex = notex+xw
  358.                end
  359.  
  360.                when nn== '8' then do
  361.  
  362.                    y = 2.21+zz
  363.                    Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  364.                    boxnm = ppm_DocNextBox(Pbox)
  365.                    call ppm_DeleteContents(boxnm)
  366.                    call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/achtelPause', pause)
  367.                    xw = xg/8
  368.                    notex = notex+xw
  369.                end
  370.  
  371.                when nn== '16' then do
  372.  
  373.                    y = 2.21+zz
  374.                    Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  375.                    boxnm = ppm_DocNextBox(Pbox)
  376.                    call ppm_DeleteContents(boxnm)
  377.                    call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/sechzehntelPause', pause)
  378.                    xw = xg/16
  379.                    notex = notex+xw
  380.                end
  381.                otherwise notenwert()
  382.            end
  383.            if notex >=18.7 then
  384.                do
  385.                  notex = 2.5
  386.                  zz = zz + 4
  387.                end
  388.            px = notex - 4
  389.            py = zz-1
  390.            if px < 0 then px = 0
  391.            call ppm_SetPagePosition(px, py+2)
  392.            notenwert()
  393.         end
  394.  
  395.       when nw == 'l' then
  396.         do
  397.            /* wert = ppm_GetForm("1/1 1/2 1/4 1/8 1/16 ...?", 2, "1 , 2, 4, 8, 16") */
  398.           select
  399.  
  400.            when nn== '1' then
  401.                do
  402.                xw = xg
  403.                notex = notex+xw
  404.                end
  405.            when nn== '2' then
  406.                do
  407.                xw = xg/2
  408.                notex = notex+xw
  409.                end
  410.            when nn== '4' then
  411.                do
  412.                xw = xg/4
  413.                notex = notex+xw
  414.                end
  415.            when nn== '8' then
  416.                do
  417.                xw = xg/8
  418.                notex = notex+xw
  419.                end
  420.            when nn== '16' then
  421.                do
  422.                xw = xg/16
  423.                notex = notex+xw
  424.                end
  425.            when nn == 't' then
  426.                do
  427.                xw  = 0.2
  428.                notex = notex+xw
  429.                end
  430.            otherwise notenwert()
  431.           end
  432.            if notex >=18.7 then
  433.                do
  434.                  notex = 2.5
  435.                  zz = zz + 4
  436.                end
  437.            px = notex - 4
  438.            py = zz-1
  439.            if px < 0 then px = 0
  440.            call ppm_SetPagePosition(px, py+2)
  441.            notenwert()
  442.         end
  443.  
  444.       when nw == 'neu' then
  445.         do
  446.            call ppm_DeleteBox(zbid)
  447.            clickpos()
  448.         end
  449.       otherwise notenwert()
  450.     end
  451.  
  452.  
  453.      /* y-Raster der Noten - Notenhälse nach oben (y-Position der Box) */
  454.  
  455.         call ppm_SetLineWeight(0.25)
  456.  
  457.       select
  458.         when nn=='c5'  then
  459.         do
  460.             yw = 0.945
  461.             if al == 'a' then call auflhoch()
  462.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  463.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  464.         end
  465.  
  466.         when nn=='h4'  then
  467.         do
  468.             yw = 1.045
  469.             if al == 'a' then call auflhoch()
  470.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  471.         end
  472.  
  473.         when nn=='b4'  then
  474.         do
  475.             yw = 1.045
  476.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  477.         end
  478.  
  479.         when nn=='a#4' then
  480.         do
  481.             yw = 1.145
  482.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  483.             call ppm_SetSize(20)
  484.             call ppm_TextIntoBox(box#id, 's')
  485.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  486.         end
  487.  
  488.         when nn=='a4'  then
  489.         do
  490.             yw = 1.145
  491.             if al == 'a' then call auflhoch()
  492.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  493.         end
  494.  
  495.         when nn=='ab4' then
  496.         do
  497.             yw = 1.145
  498.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  499.             call ppm_SetSize(20)
  500.             call ppm_TextIntoBox(box#id, 'f')
  501.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  502.         end
  503.  
  504.         when nn=='g#4' then
  505.         do
  506.             yw = 1.245
  507.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  508.             call ppm_SetSize(20)
  509.             call ppm_TextIntoBox(box#id, 's')
  510.         end
  511.         when nn=='g4'  then
  512.         do
  513.             yw = 1.245
  514.             if al == 'a' then call auflhoch()
  515.         end
  516.         when nn=='gb4' then
  517.         do
  518.             yw = 1.245
  519.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  520.             call ppm_SetSize(20)
  521.             call ppm_TextIntoBox(box#id, 'f')
  522.         end
  523.         when nn=='f#4' then
  524.         do
  525.             yw = 1.345
  526.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  527.             call ppm_SetSize(20)
  528.             call ppm_TextIntoBox(box#id, 's')
  529.         end
  530.         when nn=='f4'  then
  531.         do
  532.             yw = 1.345
  533.             if al == 'a' then call auflhoch()
  534.         end
  535.         when nn=='e#4' then
  536.         do
  537.             yw = 1.445
  538.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  539.             call ppm_SetSize(20)
  540.             call ppm_TextIntoBox(box#id, 's')
  541.         end
  542.         when nn=='e4'  then
  543.         do
  544.             yw = 1.445
  545.             if al == 'a' then call auflhoch()
  546.         end
  547.         when nn=='eb4' then
  548.         do
  549.             yw = 1.445
  550.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  551.             call ppm_SetSize(20)
  552.             call ppm_TextIntoBox(box#id, 'f')
  553.         end
  554.         when nn=='d#4' then
  555.         do
  556.             yw = 1.545
  557.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  558.             call ppm_SetSize(20)
  559.             call ppm_TextIntoBox(box#id, 's')
  560.         end
  561.         when nn=='d4'  then
  562.         do
  563.             yw = 1.545
  564.             if al == 'a' then call auflhoch()
  565.         end
  566.         when nn=='db4' then
  567.         do
  568.             yw = 1.545
  569.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  570.             call ppm_SetSize(20)
  571.             call ppm_TextIntoBox(box#id, 'f')
  572.         end
  573.         when nn=='c#4' then
  574.         do
  575.             yw = 1.645
  576.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  577.             call ppm_SetSize(20)
  578.             call ppm_TextIntoBox(box#id, 's')
  579.         end
  580.         when nn=='c4'  then
  581.         do
  582.             yw = 1.645
  583.             if al == 'a' then call auflhoch()
  584.         end
  585.         when nn=='h3'  then
  586.         do
  587.             yw = 1.745
  588.             if al == 'a' then call auflhoch()
  589.         end
  590.         when nn=='b3'  then
  591.         do
  592.             yw = 1.745
  593.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  594.             call ppm_SetSize(20)
  595.             call ppm_TextIntoBox(box#id, 'f')
  596.         end
  597.         when nn=='a#3' then
  598.         do
  599.             yw = 1.845
  600.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  601.             call ppm_SetSize(20)
  602.             call ppm_TextIntoBox(box#id, 's')
  603.         end
  604.         when nn=='a3'  then
  605.         do
  606.             yw = 1.845
  607.             if al == 'a' then call auflhoch()
  608.         end
  609.         when nn=='ab3' then
  610.         do
  611.             yw = 1.845
  612.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  613.             call ppm_SetSize(20)
  614.             call ppm_TextIntoBox(box#id, 'f')
  615.         end
  616.         when nn=='g#3' then
  617.         do
  618.             yw = 1.945
  619.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  620.             call ppm_SetSize(20)
  621.             call ppm_TextIntoBox(box#id, 's')
  622.         end
  623.         when nn=='g3'  then
  624.         do
  625.             yw = 1.945
  626.             if al == 'a' then call auflhoch()
  627.         end
  628.         when nn=='gb3' then
  629.         do
  630.             yw = 1.945
  631.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  632.             call ppm_SetSize(20)
  633.             call ppm_TextIntoBox(box#id, 'f')
  634.         end
  635.         when nn=='f#3' then
  636.         do
  637.             yw = 2.045
  638.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  639.             call ppm_SetSize(20)
  640.             call ppm_TextIntoBox(box#id, 's')
  641.         end
  642.         when nn=='f3'  then
  643.         do
  644.             yw = 2.045
  645.             if al == 'a' then call auflhoch()
  646.         end
  647.         when nn=='e#3' then
  648.         do
  649.             yw = 2.145
  650.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  651.             call ppm_SetSize(20)
  652.             call ppm_TextIntoBox(box#id, 's')
  653.         end
  654.         when nn=='e3'  then
  655.         do
  656.             yw = 2.145
  657.             if al == 'a' then call auflhoch()
  658.         end
  659.         when nn=='eb3' then
  660.         do
  661.             yw = 2.145
  662.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  663.             call ppm_SetSize(20)
  664.             call ppm_TextIntoBox(box#id, 'f')
  665.         end
  666.         when nn=='d#3' then
  667.         do
  668.             yw = 2.245
  669.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  670.             call ppm_SetSize(20)
  671.             call ppm_TextIntoBox(box#id, 's')
  672.         end
  673.         when nn=='d3'  then
  674.         do
  675.             yw = 2.245
  676.             if al == 'a' then call auflhoch()
  677.         end
  678.         when nn=='db3' then
  679.         do
  680.             yw = 2.245
  681.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  682.             call ppm_SetSize(20)
  683.             call ppm_TextIntoBox(box#id, 'f')
  684.         end
  685.  
  686.         when nn=='c#3' then
  687.         do
  688.             yw = 2.345
  689.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  690.             call ppm_SetSize(20)
  691.             call ppm_TextIntoBox(box#id, 's')
  692.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  693.         end
  694.  
  695.         when nn=='c3'  then
  696.         do
  697.             yw = 2.345
  698.             if al == 'a' then call auflhoch()
  699.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  700.         end
  701.  
  702.         when nn=='h2'  then
  703.         do
  704.             yw = 2.445
  705.             if al == 'a' then call auflhoch()
  706.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  707.         end
  708.  
  709.         when nn=='b2'  then
  710.         do
  711.             yw = 2.445
  712.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  713.             call ppm_SetSize(20)
  714.             call ppm_TextIntoBox(box#id, 'f')
  715.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  716.         end
  717.  
  718.         when nn=='a#2' then
  719.         do
  720.             yw = 2.545
  721.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  722.             call ppm_SetSize(20)
  723.             call ppm_TextIntoBox(box#id, 's')
  724.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  725.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  726.         end
  727.  
  728.         when nn=='a2'  then
  729.         do
  730.             yw = 2.545
  731.             if al == 'a' then call auflhoch()
  732.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  733.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  734.         end
  735.  
  736.         when nn=='ab2'  then
  737.         do
  738.             yw = 2.545
  739.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  740.             call ppm_SetSize(20)
  741.             call ppm_TextIntoBox(box#id, 'f')
  742.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  743.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  744.         end
  745.  
  746.         when nn=='g#2'  then
  747.         do
  748.             yw = 2.645
  749.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  750.             call ppm_SetSize(20)
  751.             call ppm_TextIntoBox(box#id, 's')
  752.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  753.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  754.         end
  755.  
  756.         when nn=='g2'  then
  757.         do
  758.             yw = 2.645
  759.             if al == 'a' then call auflhoch()
  760.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  761.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  762.         end
  763.  
  764.  
  765.         when nn=='gb2'  then
  766.         do
  767.             yw = 2.645
  768.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  769.             call ppm_SetSize(20)
  770.             call ppm_TextIntoBox(box#id, 'f')
  771.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  772.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  773.         end
  774.  
  775.         when nn=='f#2'  then
  776.         do
  777.             yw = 2.745
  778.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  779.             call ppm_SetSize(20)
  780.             call ppm_TextIntoBox(box#id, 's')
  781.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  782.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  783.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  784.         end
  785.  
  786.         when nn=='f2'  then
  787.         do
  788.             yw = 2.745
  789.             if al == 'a' then call auflhoch()
  790.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  791.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  792.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  793.         end
  794.  
  795.         when nn=='e2'  then
  796.         do
  797.             yw = 2.845
  798.             if al == 'a' then call auflhoch()
  799.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  800.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  801.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  802.         end
  803.  
  804.  
  805.     /* y-Raster der Noten - Notenhälse nach unten */
  806.  
  807.         when nn=='C5'  then
  808.         do
  809.             yw = 1.42
  810.             if al == 'a' then call aufltief()
  811.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  812.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  813.         end
  814.  
  815.         when nn=='H4'  then
  816.         do
  817.             yw = 1.52
  818.             if al == 'a' then call aufltief()
  819.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  820.         end
  821.  
  822.         when nn=='B4'  then
  823.         do
  824.             yw = 1.52
  825.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  826.             call ppm_SetSize(20)
  827.             call ppm_TextIntoBox(box#id, 'f')
  828.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  829.         end
  830.  
  831.         when nn=='A#4' then
  832.         do
  833.             yw = 1.62
  834.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  835.             call ppm_SetSize(20)
  836.             call ppm_TextIntoBox(box#id, 's')
  837.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  838.         end
  839.  
  840.         when nn=='A4'  then
  841.         do
  842.             yw = 1.62
  843.             if al == 'a' then call aufltief()
  844.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  845.         end
  846.  
  847.         when nn=='Ab4' then
  848.         do
  849.             yw = 1.62
  850.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  851.             call ppm_SetSize(20)
  852.             call ppm_TextIntoBox(box#id, 'f')
  853.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  854.         end
  855.  
  856.         when nn=='G#4' then
  857.         do
  858.             yw = 1.72
  859.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  860.             call ppm_SetSize(20)
  861.             call ppm_TextIntoBox(box#id, 's')
  862.         end
  863.         when nn=='G4'  then
  864.         do
  865.             yw = 1.72
  866.             if al == 'a' then call aufltief()
  867.         end
  868.         when nn=='Gb4' then
  869.         do
  870.             yw = 1.72
  871.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  872.             call ppm_SetSize(20)
  873.             call ppm_TextIntoBox(box#id, 'f')
  874.         end
  875.         when nn=='F#4' then
  876.         do
  877.             yw = 1.82
  878.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  879.             call ppm_SetSize(20)
  880.             call ppm_TextIntoBox(box#id, 's')
  881.         end
  882.         when nn=='F4'  then
  883.         do
  884.             yw = 1.82
  885.             if al == 'a' then call aufltief()
  886.         end
  887.         when nn=='E#4' then
  888.         do
  889.             yw = 1.92
  890.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  891.             call ppm_SetSize(20)
  892.             call ppm_TextIntoBox(box#id, 's')
  893.         end
  894.         when nn=='E4'  then
  895.         do
  896.             yw = 1.92
  897.             if al == 'a' then call aufltief()
  898.         end
  899.         when nn=='Eb4' then
  900.         do
  901.             yw = 1.92
  902.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  903.             call ppm_SetSize(20)
  904.             call ppm_TextIntoBox(box#id, 'f')
  905.         end
  906.         when nn=='D#4' then
  907.         do
  908.             yw = 2.02
  909.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  910.             call ppm_SetSize(20)
  911.             call ppm_TextIntoBox(box#id, 's')
  912.         end
  913.         when nn=='D4'  then
  914.         do
  915.             yw = 2.02
  916.             if al == 'a' then call aufltief()
  917.         end
  918.         when nn=='Db4' then
  919.         do
  920.             yw = 2.02
  921.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  922.             call ppm_SetSize(20)
  923.             call ppm_TextIntoBox(box#id, 'f')
  924.         end
  925.         when nn=='C#4' then
  926.         do
  927.             yw = 2.12
  928.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  929.             call ppm_SetSize(20)
  930.             call ppm_TextIntoBox(box#id, 's')
  931.         end
  932.         when nn=='C4'  then
  933.         do
  934.             yw = 2.12
  935.             if al == 'a' then call aufltief()
  936.         end
  937.         when nn=='H3'  then
  938.         do
  939.             yw = 2.22
  940.             if al == 'a' then call aufltief()
  941.         end
  942.         when nn=='B3'  then
  943.         do
  944.             yw = 2.22
  945.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  946.             call ppm_SetSize(20)
  947.             call ppm_TextIntoBox(box#id, 'f')
  948.         end
  949.         when nn=='A#3' then
  950.         do
  951.             yw = 2.32
  952.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  953.             call ppm_SetSize(20)
  954.             call ppm_TextIntoBox(box#id, 's')
  955.         end
  956.         when nn=='A3'  then
  957.         do
  958.             yw = 2.32
  959.             if al == 'a' then call aufltief()
  960.         end
  961.         when nn=='Ab3' then
  962.         do
  963.             yw = 2.32
  964.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  965.             call ppm_SetSize(20)
  966.             call ppm_TextIntoBox(box#id, 'f')
  967.         end
  968.         when nn=='G#3' then
  969.         do
  970.             yw = 2.42
  971.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  972.             call ppm_SetSize(20)
  973.             call ppm_TextIntoBox(box#id, 's')
  974.         end
  975.         when nn=='G3'  then
  976.         do
  977.             yw = 2.42
  978.             if al == 'a' then call aufltief()
  979.         end
  980.         when nn=='Gb3' then
  981.         do
  982.             yw = 2.42
  983.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  984.             call ppm_SetSize(20)
  985.             call ppm_TextIntoBox(box#id, 'f')
  986.         end
  987.         when nn=='F#3' then
  988.         do
  989.             yw = 2.52
  990.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  991.             call ppm_SetSize(20)
  992.             call ppm_TextIntoBox(box#id, 's')
  993.         end
  994.         when nn=='F3'  then
  995.         do
  996.             yw = 2.52
  997.             if al == 'a' then call aufltief()
  998.         end
  999.         when nn=='E#3' then
  1000.         do
  1001.             yw = 2.62
  1002.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1003.             call ppm_SetSize(20)
  1004.             call ppm_TextIntoBox(box#id, 's')
  1005.         end
  1006.         when nn=='E3'  then
  1007.         do
  1008.             yw = 2.62
  1009.             if al == 'a' then call aufltief()
  1010.         end
  1011.         when nn=='Eb3' then
  1012.         do
  1013.             yw = 2.62
  1014.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1015.             call ppm_SetSize(20)
  1016.             call ppm_TextIntoBox(box#id, 'f')
  1017.         end
  1018.         when nn=='D#3' then
  1019.         do
  1020.             yw = 2.72
  1021.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1022.             call ppm_SetSize(20)
  1023.             call ppm_TextIntoBox(box#id, 's')
  1024.         end
  1025.         when nn=='D3'  then
  1026.         do
  1027.             yw = 2.72
  1028.             if al == 'a' then call aufltief()
  1029.         end
  1030.         when nn=='Db3' then
  1031.         do
  1032.             yw = 2.72
  1033.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1034.             call ppm_SetSize(20)
  1035.             call ppm_TextIntoBox(box#id, 'f')
  1036.         end
  1037.  
  1038.         when nn=='C#3' then
  1039.         do
  1040.             yw = 2.82
  1041.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1042.             call ppm_SetSize(20)
  1043.             call ppm_TextIntoBox(box#id, 's')
  1044.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1045.         end
  1046.  
  1047.         when nn=='C3'  then
  1048.         do
  1049.             yw = 2.82
  1050.             if al == 'a' then call aufltief()
  1051.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1052.         end
  1053.  
  1054.         when nn=='H2'  then
  1055.         do
  1056.             yw = 2.92
  1057.             if al == 'a' then call aufltief()
  1058.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1059.         end
  1060.  
  1061.         when nn=='B2'  then
  1062.         do
  1063.             yw = 2.92
  1064.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1065.             call ppm_SetSize(20)
  1066.             call ppm_TextIntoBox(box#id, 'f')
  1067.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1068.         end
  1069.  
  1070.         when nn=='A#2' then
  1071.         do
  1072.             yw = 3.02
  1073.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1074.             call ppm_SetSize(20)
  1075.             call ppm_TextIntoBox(box#id, 's')
  1076.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1077.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1078.         end
  1079.  
  1080.         when nn=='A2'  then
  1081.         do
  1082.           yw = 3.02
  1083.             if al == 'a' then call aufltief()
  1084.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1085.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1086.         end
  1087.  
  1088.         when nn=='Ab2'  then
  1089.         do
  1090.           yw = 3.02
  1091.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1092.           call ppm_SetSize(20)
  1093.           call ppm_TextIntoBox(box#id, 'f')
  1094.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1095.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1096.         end
  1097.  
  1098.         when nn=='G#2'  then
  1099.         do
  1100.             yw = 3.12
  1101.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1102.             call ppm_SetSize(20)
  1103.             call ppm_TextIntoBox(box#id, 's')
  1104.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1105.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1106.         end
  1107.  
  1108.         when nn=='G2'  then
  1109.         do
  1110.           yw = 3.12
  1111.             if al == 'a' then call aufltief()
  1112.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1113.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1114.         end
  1115.  
  1116.         when nn=='Gb2'  then
  1117.         do
  1118.           yw = 3.12
  1119.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1120.           call ppm_SetSize(20)
  1121.           call ppm_TextIntoBox(box#id, 'f')
  1122.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1123.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1124.         end
  1125.  
  1126.         when nn=='F#2'  then
  1127.         do
  1128.           yw = 3.22
  1129.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1130.           call ppm_SetSize(20)
  1131.           call ppm_TextIntoBox(box#id, 's')
  1132.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1133.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1134.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1135.         end
  1136.  
  1137.         when nn=='F2'  then
  1138.         do
  1139.           yw = 3.22
  1140.             if al == 'a' then call aufltief()
  1141.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1142.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1143.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1144.         end
  1145.  
  1146.         when nn=='E2'  then
  1147.         do
  1148.           yw = 3.32
  1149.             if al == 'a' then call aufltief()
  1150.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1151.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1152.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1153.         end
  1154.         otherwise notenwert()
  1155.       end
  1156.  
  1157.  
  1158.         /* größe einer Notenbox */
  1159.           notewidht = 0.64
  1160.           noteheight = 0.97
  1161.  
  1162.  
  1163.           boxid = ppm_CreateBox(notex, yw+zz, notewidht, noteheight, 0)
  1164.           call ppm_SetSize(notepkt)
  1165.           call ppm_TextIntoBox(boxid, nw)
  1166.           notex = (notex + xw)
  1167.           if notex >=18.7 then
  1168.               do
  1169.                 notex = 2.5
  1170.                 zz = zz + 4
  1171.               end
  1172.           px = notex - 4
  1173.           py = zz-1
  1174.           if px < 0 then px = 0
  1175.           call ppm_SetPagePosition(px, py+2)
  1176.       end
  1177.    end
  1178. exit
  1179.  
  1180. auflhoch:
  1181. do
  1182.   Pbox = ppm_CreateBox(notex-0.34, yw+zz+0.07, 0.6, 1.2, 0)
  1183.   boxnm = ppm_DocNextBox(Pbox)
  1184.   call ppm_DeleteContents(boxnm)
  1185.   call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/Auflsng', Zeichen)
  1186.   return
  1187. end
  1188.  
  1189. aufltief:
  1190. do
  1191.   Pbox = ppm_CreateBox(notex-0.34, yw+zz-0.4, 0.6, 1.2, 0)
  1192.   boxnm = ppm_DocNextBox(Pbox)
  1193.   call ppm_DeleteContents(boxnm)
  1194.   call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/Auflsng', Zeichen)
  1195.   return
  1196. end
  1197.  
  1198. break_d:
  1199. break_e:
  1200. break_c:
  1201. halt:
  1202.     call exit_msg("User aborted Genie!")
  1203.  
  1204.  
  1205. exit_msg: procedure
  1206. do
  1207.     parse arg message
  1208.  
  1209.     if message ~= '' then
  1210.     call ppm_Inform(1,message,)
  1211.  
  1212.     call ppm_ClearStatus()
  1213.     call ppm_AutoUpdate(1)
  1214.     exit
  1215. end
  1216.  
  1217.